<?php
/**
 * Created by novebeta.
 * Date: 12/4/12
 * Time: 10:01 PM
 */
Yii::import('ext.portlet.XPortlet');
class galeriKanan extends XPortlet
{
    //public $galeri = array();
    protected function renderContent()
    { 
       /*galeri*/ 
       $criteria_galeri=new CDbCriteria();
       $criteria_galeri->order='id desc'; 
       //$criteria_galeri->limit='8';    
       $count=Galeri::model()->count($criteria_galeri); 
       $pages = new CPagination($count);
        // results per page
        $pages->pageSize = 5;
        $pages->applyLimit($criteria_galeri);
         
	   $models_galeri=Galeri::model()->findAll($criteria_galeri);       
       $this->render('galeriKanan',array(    
       'model_galeri'=>$models_galeri, 
       'count'=>$count ,
       'pages' => $pages   
		));
      
    }
}
